package selfStudy.demo2.iotest;

import java.io.*;

public class Test3 {
    public static void main(String[] args) throws IOException {
        //请将D:盘下的一个文件复制到E:盘下，例如：d:\\视频.itcast，复制到E:\\视频.itcast。
        //		请使用“字节缓冲流”：BufferedInputStream和BufferedOutputStream实现
        BufferedInputStream bis = new BufferedInputStream((new FileInputStream("D:\\develop\\workspace\\Advance_Code\\day12\\src\\selfStudy\\demo2\\iotest\\Test1.java")));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("E:\\a.java"));
        byte[] b = new byte[1024];
        int a;
        while((a=bis.read(b))!=-1){
            bos.write(b,0,a);
        }
        bis.close();
        bos.close();
    }
}

